﻿
/* 
 * Since 2008 - 2012
 */
package com.hh.bss.sysadmin.entity;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.sysadmin.dao.*;
import com.hh.bss.sysadmin.entity.*;
import com.hh.bss.sysadmin.service.*;
import com.hh.bss.sysadmin.vo.query.*;
import com.hh.bss.util.*;





public class SystemDic extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SystemDic";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_CODE_NBR = "codeNbr";
	public static final String ALIAS_CODE_NAME_CN = "codeNameCn";
	public static final String ALIAS_CODE_NAME_EN = "codeNameEn";
	public static final String ALIAS_CATEGORY = "category";
	public static final String ALIAS_PARENT_ID = "parentId";
	public static final String ALIAS_PARENT_IDS = "parentIds";
	public static final String ALIAS_STATUS = "status";
	public static final String ALIAS_SEQNO = "seqno";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_CREATE_DT = "createDt";
	public static final String ALIAS_MODIFIER = "modifier";
	public static final String ALIAS_MODIFIED_DT = "modifiedDt";
	
	//date formats
	public static final String FORMAT_CREATE_DT = DATE_FORMAT;
	public static final String FORMAT_MODIFIED_DT = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START

	public static String DIC_JOB="JOB";//职能
	public static String DIC_INDUSTRY="INDUSTRY";
	public static String DIC_CVTYPE="CVTYPE";
	public static String DIC_DEGREE="DEGREE";
	public static String DIC_LANGUAGE="LANGUAGE";
	public static String DIC_SALARY="SALARY";
	public static String DIC_CVTAG="CVTAG";
	public static String DIC_JOBLEVEL="JOBLEVEL";//职级
	public static String DIC_COMPANY_NATURE="COMPANY_NATURE";
	public static String DIC_ORGANIZATION_TYPE="ORGANIZATION_TYPE";
	public static String DIC_LOCATION="LOCATION";
	
	private java.lang.Integer id;
	@Length(max=20)
	private java.lang.String codeNbr;
	@NotBlank @Length(max=255)
	private java.lang.String codeNameCn;
	@Length(max=255)
	private java.lang.String codeNameEn;
	@Length(max=20)
	private java.lang.String category;
	@NotNull 
	private java.lang.Integer parentId;
	@NotBlank @Length(max=1000)
	private java.lang.String parentIds;
	@NotBlank @Length(max=1)
	private java.lang.String status;
	
	private java.lang.Integer seqNo;
	@Length(max=50)
	private java.lang.String creator;
	
	private java.util.Date createDt;
	@Length(max=50)
	private java.lang.String modifier;
	
	private java.util.Date modifiedDt;
	//columns END

	public SystemDic(){
	}

	public SystemDic(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setCodeNbr(java.lang.String value) {
		this.codeNbr = value;
	}
	
	public java.lang.String getCodeNbr() {
		return this.codeNbr;
	}
	public void setCodeNameCn(java.lang.String value) {
		this.codeNameCn = value;
	}
	
	public java.lang.String getCodeNameCn() {
		return this.codeNameCn;
	}
	public void setCodeNameEn(java.lang.String value) {
		this.codeNameEn = value;
	}
	
	public java.lang.String getCodeNameEn() {
		return this.codeNameEn;
	}
	public void setCategory(java.lang.String value) {
		this.category = value;
	}
	
	public java.lang.String getCategory() {
		return this.category;
	}
	public void setParentId(java.lang.Integer value) {
		this.parentId = value;
	}
	
	public java.lang.Integer getParentId() {
		return this.parentId;
	}
	public void setParentIds(java.lang.String value) {
		this.parentIds = value;
	}
	
	public java.lang.String getParentIds() {
		return this.parentIds;
	}
	public void setStatus(java.lang.String value) {
		this.status = value;
	}
	
	public java.lang.String getStatus() {
		return this.status;
	}
	public void setSeqNo(java.lang.Integer value) {
		this.seqNo = value;
	}
	
	public java.lang.Integer getSeqNo() {		
		return this.seqNo;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public String getCreateDtString() {
		return DateConvertUtils.format(getCreateDt(), FORMAT_CREATE_DT);
	}
	public void setCreateDtString(String value) {
		setCreateDt(DateConvertUtils.parse(value, FORMAT_CREATE_DT,java.util.Date.class));
	}
	
	public void setCreateDt(java.util.Date value) {
		this.createDt = value;
	}
	
	public java.util.Date getCreateDt() {
		return this.createDt;
	}
	public void setModifier(java.lang.String value) {
		this.modifier = value;
	}
	
	public java.lang.String getModifier() {
		return this.modifier;
	}
	public String getModifiedDtString() {
		return DateConvertUtils.format(getModifiedDt(), FORMAT_MODIFIED_DT);
	}
	public void setModifiedDtString(String value) {
		setModifiedDt(DateConvertUtils.parse(value, FORMAT_MODIFIED_DT,java.util.Date.class));
	}
	
	public void setModifiedDt(java.util.Date value) {
		this.modifiedDt = value;
	}
	
	public java.util.Date getModifiedDt() {
		return this.modifiedDt;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("CodeNbr",getCodeNbr())
			.append("CodeNameCn",getCodeNameCn())
			.append("CodeNameEn",getCodeNameEn())
			.append("Category",getCategory())
			.append("ParentId",getParentId())
			.append("ParentIds",getParentIds())
			.append("Status",getStatus())
			.append("Seqno",getSeqNo())
			.append("Creator",getCreator())
			.append("CreateDt",getCreateDt())
			.append("Modifier",getModifier())
			.append("ModifiedDt",getModifiedDt())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SystemDic == false) return false;
		if(this == obj) return true;
		SystemDic other = (SystemDic)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

